﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Golf.Core" namespace="Golf.Core">
  <class name="Course" table="tb_Course" lazy="false">
    <id name="Id">
      <column name="CourseId" />
      <generator class="native" />
    </id>
    <property name="Name" not-null="true" length="50" />
    <property name="Venue" not-null="true" length="50" />
    <many-to-one name="County" column="CountyId" class="County" not-null="true" foreign-key="FK_Course_County" />
    <set name="Holes" table="tb_Hole" lazy="false">
      <key column="CourseId" />
      <one-to-many class="Hole" />
    </set>
  </class>
</hibernate-mapping>